﻿using System;
using System.Collections.Generic;
using System.Text;
using DotNet.Data;
using DotNet.Model;
using System.Data;
namespace DotNet.Business
{
	public class programClassBll
	{
		programClassDal pDal=new programClassDal();

		#region 是否存在该记录
		/// <summary>
		/// 是否存在该记录
		/// </summary>
		public bool Exists(int programClassId)
		{
			return pDal.Exists(programClassId);
		}
		#endregion

		#region 获得数据列表
		/// <summary>
		/// 获得数据列表
		/// </summary>
		public IList<programClass> GetModel()
		{
			return pDal.GetModel();
		}
		#endregion

		#region 根据标识列获得数据实体
		/// <summary>
		/// 根据标识列获得数据实体
		/// </summary>
		/// <param name="programClassId">标识列</param>
		/// <returns></returns>
		public programClass GetModel(int programClassId)
		{
			return pDal.GetModel(programClassId);
		}
		#endregion

		#region 修改信息
		/// <summary>
		/// 修改信息
		/// </summary>
		/// <param name="programClass">实体</param>
		/// <returns></returns>
		public bool Update(programClass programclass)
		{
			 return pDal.Update(programclass);
		}
		#endregion

		#region 删除信息
		/// <summary>
		/// 删除信息
		/// </summary>
		/// <param name="programClassId">标识列</param>
		/// <returns></returns>
		public bool Delete(int programClassId)
		{
			 return pDal.Delete(programClassId);
		}
		#endregion

		#region 添加信息
		/// <summary>
		/// 添加信息
		/// </summary>
		/// <param name="programClass">实体</param>
		/// <returns></returns>
		public bool Insert(programClass programclass)
		{
			 return pDal.Insert(programclass);
		}
		#endregion

        #region 获得DataTable
        /// <summary>
        /// 获得DataTable
        /// </summary>
        /// <returns></returns>
        public DataTable GetDataTable(int pcid) 
        {
            return pDal.GetDataTable(pcid);
        }
        #endregion

        #region 根据id获得类别名称
        /// <summary>
        /// 根据id获得类别名称
        /// </summary>
        /// <param name="dt"></param>
        /// <param name="pcid"></param>
        /// <returns></returns>
        public DataView GetModel(DataTable dt, int pcid) 
        {
            return pDal.GetModel(dt, pcid);
        }
        #endregion

        #region 根据父id获得信息
        /// <summary>
        /// 根据父id获得信息
        /// </summary>
        /// <param name="dt"></param>
        /// <param name="fid"></param>
        /// <returns></returns>
        public DataView GetDataView(DataTable dt,int fid) 
        {
            return pDal.GetDataView(dt, fid);
        }
        #endregion

        #region 是否存在子类
        /// <summary>
        /// 是否存在子类
        /// </summary>
        /// <param name="programClassId"></param>
        /// <returns></returns>
        public bool ExistsChildren(string programClassId)
        {
            return pDal.ExistsChildren(programClassId);
        }
        #endregion

        #region 批量删除
        /// <summary>
        /// 批量删除
        /// </summary>
        /// <param name="programClassIds"></param>
        /// <returns></returns>
        public bool delete(string[] programClassIds)
        {
            return pDal.delete(programClassIds);
        }
        #endregion

        #region 批量移动
        /// <summary>
        /// 批量移动
        /// </summary>
        /// <returns></returns>
        public bool Update(string[] pcids,string fid) 
        {
            return pDal.Update(pcids, fid);
        }
        #endregion
    }
}
